package com.xxgc.springboot.entity.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.Getter;

/**
 * @program: springboot
 * @description: 年级
 * @author: Mr.abel(ShiJiaYi)
 * @create: 2022-09-13 16:37
 **/
@Getter
public enum GradeEnum {
    PRIMARY(1, "小学"),
    SECONDORY(2, "中学"),
    HIGH(3, "高中"),
    UNIVERSITY(4,"大学");

    GradeEnum(int grade, String descp) {
        this.grade = grade;
        this.descp = descp;
    }

    @EnumValue//标记数据库存的值是code
    private final int grade;
    private final String descp;
}
